// Copyright [2020] <unknown>
#include <bits/stdc++.h>
using namespace std;
// #define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
#define dbg(x...) { cerr << "\033[32;1m" << #x << " -> "; err(x); }
void err() { cerr << "\033[39;0m" << endl; }
template<typename T, typename... A>
void err(T a, A... x) { cerr << a << ' '; err(x...); }
#else
#define dbg(...)
#endif

#define sz(x) ((int)x.size())

const int N = 1e5+50;

int t, n;

inline int f(int n, int x) {
    if (x <= n+1)
        return x-2+1;
    else
        return 2*n+1-x;
}

int main(int argc, char const *argv[]) {
    // code
    scanf("%d", &t);
    for (int kk=0; kk<t; ++kk) {
        int x, y;
        scanf("%d%d%d", &n, &x, &y);
        if (x < y) swap(x, y);
        dbg(x, y, n-y-1, x-1);
        int p1 = x - min(x-1, max(0, n-y-1));
        int p2 = x + min(n-x, y-1);
        printf("%d %d\n", p1, p2);
    }
    return 0;
}
